<template>
    <div>
        <div class="classNav">
            {{title}}
            <img v-if="showIcon" class="icon" src="@/assets/img/weChat/chatList.png" alt="" @click="to()">
        </div>
    </div>
</template>
<script>
export default {
    props: {
        title:{
            type: String,
            default: ''
        },
        showIcon:{
            type: Boolean,
            default: false
        }
    },
    data () {
        return {
            
        }
    },
    activated () {
    
    },
    methods: {
        to () {
            this.$router.push('studentList')
        }
    }
}
</script>
<style lang='less' scoped>
.classNav{
    position: relative;
  
    width: 100%;
    height: 0.88rem;
    line-height: 0.88rem;
    text-align: center;
    background: #1290EF;
    color: #fff;
    font-size: 0.32rem;
    border-top: 0.01rem solid #ccc;
    z-index: 100;
}
.icon{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.24rem;
    width: 0.35rem;
    height: 0.35rem;
}
</style>